package com.j180.dao;

import com.j180.bean.BookBean;
import org.apache.ibatis.annotations.*;
import org.springframework.jmx.export.annotation.ManagedOperationParameter;

import java.awt.print.Book;
import java.util.List;

public interface IBookDao {

    //@Select("select * from t_book")
    public List<BookBean>  getAllBooks();
    //@Select("select * from t_book where id=#{id}")
    public BookBean getBookById(@Param("id") int id);
    //@Insert("insert into t_book values(null,#{name},#{price},#{pic},#{num})")
    public int  insertBook(BookBean bookBean);
    //@Delete("delete from t_book where id=#{id}")
    public int  deleteBookById(@Param("id") int id);
    //@Update("update t_book set name=#{name},price=#{price},pic=#{pic},num=#{num} where id=#{id}")
    public int  updatetBook(BookBean bookBean);

}
